/**
 * Core Java Volume I-Fundamentals
 *
 * @version 10th
 * @author Cay S. Horstmann
 * @see http://horstmann.com/corejava
 */

/**
 * This program demonstrates inheritance.
 */
public class ManagerTest {
    public static void main(String[] args) {
        // constructor a Manager object
        Manager boss = new Manager("Carl Cracker", 8000, 1987, 12, 15);
        boss.setBonus(5000);

        Employee[] staff = new Employee[3];

        // fill the staff array with Manager and Employee objects
        staff[0] = boss;
        staff[1] = new Employee("Harry Hacker", 5000, 1989, 10, 1);
        staff[2] = new Employee("Tommy Tester", 4000, 1990, 3, 15);

        // print out information about all Employee objects
        for (Employee e : staff) {
            System.out.println(
                "name = " + e.getName()+ ", salary = " + e.getSalary());
        }
    }
}

/*
output:
name = Carl Cracker, salary = 13000.0
name = Harry Hacker, salary = 5000.0
name = Tommy Tester, salary = 4000.0
*/

